//
//  SettingViewModel.m
//  GuShiNews
//
//  Created by huachun on 2019/8/16.
//  Copyright © 2019 Jones. All rights reserved.
//

#import "SettingViewModel.h"
#import "CenterModel.h"

@implementation SettingViewModel

- (instancetype)init:(id)responseObject{
    if (self = [super init]) {
        
        self.dataSource = [NSMutableArray new];
        
        NSMutableArray *array002 = [NSMutableArray new];
        [self.dataSource addObject:array002];
        
        for (int i=0; i<3; i++) {
            CenterModel *model = [CenterModel new];
            model.Height = 60;
            if (i==0) {
                model.Tittle = @"建议与反馈";
                model.Type   = @"100";
            }else if (i == 1){
                model.Tittle = @"清理缓存";
                model.Type   = @"120";
            }else{
                model.Tittle = @"关于我们";
                model.Type   = @"110";
            }
            [array002 addObject:model];
        }
        
        UserModel *userlin = [UserModel info];
        
        if (userlin.userid) {
            NSMutableArray *array003 = [NSMutableArray new];
            [self.dataSource addObject:array003];
            
            for (int i=0; i<2; i++) {
                CenterModel *model = [CenterModel new];
                model.Height = 60;
                
                if (i==0) {
                    model.Type   = @"300";
                    model.Tittle = @"黑名单";
                }else{
                    model.Type   = @"200";
                    model.Tittle = @"退出登录";
                }
                
                [array003 addObject:model];
            }
        }
        
    }
    return self;
}

@end
